package cn.lifeaid.task;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class LifeAidTask {
	SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");

	@Scheduled(cron = "0/5 * *  * * ? ")
	// 每5秒执行一次
	public void testTask() {
		System.out.println(format.format(new Date()) + "hello lifeAid");
	}
}
